package org.shopen.ai.puremvc.controller.domain
{
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	import org.shopen.ai.puremvc.ApplicationConstants;
	import org.shopen.ai.puremvc.view.domain.cities.SelectCountryWindowMediator;

	public class HandleSelectStateCommand extends SimpleCommand
	{
		override public function execute(notification:INotification):void
		{
			var type : String = notification.getType();
			var body : Object = notification.getBody();
			if (!facade.hasMediator(SelectCountryWindowMediator.NAME))
			{
				facade.registerMediator(new SelectCountryWindowMediator(type, body));
			}
			sendNotification(ApplicationConstants.SHOW_SELECTCOUNTRY, body, type);
		}
	}
}